# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=fclones
pkgver=0.34.0
pkgrel=0
pkgdesc="Efficient duplicate file finder"
url="https://github.com/pkolaczk/fclones"
license="MIT"
arch="all !s390x" # incompatible with nix crate
arch="$arch !armhf !armv7 !x86 !ppc64le" # tests fail
makedepends="cargo eudev-dev cargo-auditable"
source="https://github.com/pkolaczk/fclones/archive/v$pkgver/fclones-$pkgver.tar.gz
	musl-fix.patch
	"
options="net"


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
ba0411eed18f5db2b696efd3d747666ab09d075493f11492754243f5304bd0b652f1659e9aa2ca399e58e08c9b17ca311d21fa2b34081178fbd3a27175aeda77  fclones-0.34.0.tar.gz
8e8a3ba0d2e66f7fd909e1992a8f90f6ac9307b456a3825beb23337ff5a48bc30809b694ccfce3c7208ee48fa6b93c7185841d628815ca8b8bb18f14522a65ff  musl-fix.patch
"
